<?php
/**
 * User: Hunman
 * Date: 18.06.13
 * Time: 22:16
 */
class Controller_Default extends Controller_Conrtoller
{


    function __construct()
    {
//        $this->getData();
    }

    public
    function pagination ($pageLink, $id)
    {
        $paginationEnd = (int) $this->filters["lC"];

        $pageLink = explode("_", $pageLink);

        $model = new Model_Default();
        $countProducts = $model->pagination($pageLink[1], $id);
        $countProducts = (int) $countProducts;

        if ($paginationEnd != 0)
        {
            $this->countPage = ceil($countProducts/($paginationEnd));
        }
    }


//    protected
//    function getData()
//    {
//        $model = new Model_Default();
//        $data = $model->getContent();
//        $view = new View_Default();
//
//        $view->pageContents = $data;
//
//        $view->pageContents;
//
//        $this->view = array_merge($this->view, $view->view());
//    }
}